const echarts = require("echarts")

var option = {
  grid: {
    top: "18%",
    bottom: "12%",
    left: '6%',
    right: '6%'

  },
  tooltip: {
    trigger: "axis",
    axisPointer: {
      type: "shadow",
      label: {
        show: true
      }
    }
  },
  legend: {
    data: ["缺检次数", "应检次数", "实检次数"],
    top: "2%",
    right: '10',
    textStyle: {
      color: "rgba(250,250,250,0.6)",
      fontSize: 16
    }
  },
  xAxis: {
    data: [
      '张霖', '梅秋', '李金凤', '冯都', '赵明明', '张俊峰', '李峰', '孙超', '赵丰进', '韩茜', '李超君', '赵建军', '张俊杰', '吴君', '周晶晶', '李福海'
    ],
    axisLine: {
      show: true, //隐藏X轴轴线
      lineStyle: {
        color: '#26D9FF',
        width: 2
      }
    },
    axisTick: {
      show: true //隐藏X轴刻度
    },
    axisLabel: {
      show: true,
      textStyle: {
        color: "rgba(250,250,250,0.6)", //X轴文字颜色
        fontSize: 16
      }
    },
    splitArea: {
      show: true,
      areaStyle: {
        color: ["rgba(250,250,250,0.1)", "rgba(250,250,250,0)"]
      }
    }
  },
  yAxis: [{
    type: "value",
    max: 12,
    /*name: "亿元",*/
    nameTextStyle: {
      color: "#ebf8ac",
      fontSize: 16
    },
    splitLine: {
      show: false
    },
    axisTick: {
      show: true
    },
    axisLine: {
      show: true,
      lineStyle: {
        color: '#26D9FF',
        width: 2
      }
    },
    axisLabel: {
      show: true,
      textStyle: {
        color: "rgba(250,250,250,0.6)",
        fontSize: 16
      }
    },

  },
  {
    type: "value",
    /*name: "同比",*/
    nameTextStyle: {
      color: "#ebf8ac",
      fontSize: 16
    },
    position: "right",
    splitLine: {
      show: false
    },
    axisTick: {
      show: false
    },
    axisLine: {
      show: false
    },
    axisLabel: {
      show: true,
      formatter: "{value} %", //右侧Y轴文字显示
      textStyle: {
        color: "rgba(250,250,250,0.6)",
        fontSize: 16
      }
    }
  }
  ],
  series: [{
    name: "缺检次数",
    type: "line",
    yAxisIndex: 1, //使用的 y 轴的 index，在单个图表实例中存在多个 y轴的时候有用
    smooth: true, //平滑曲线显示
    showAllSymbol: true, //显示所有图形。
    symbol: "circle", //标记的图形为实心圆
    symbolSize: 8, //标记的大小
    itemStyle: {
      //折线拐点标志的样式
      color: "#1045A0",
      borderColor: "#3D7EEB",
      width: 2,
      shadowColor: "#3D7EEB",
      shadowBlur: 4
    },
    lineStyle: {
      color: "#3D7EEB",
      width: 2,
      shadowColor: "#3D7EEB",
      shadowBlur: 4
    },
    areaStyle: {
      color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
        offset: 0,
        color: "rgba(61,126,235, 0.5)"
      },
      {
        offset: 1,
        color: "rgba(61,126,235, 0)"
      }
      ])
    },
    data: [1, 3, 4, 6, 7, 8, 2, 3, 6, 2, 1, 2, 7, 4, 9, 1]
  },
  {
    name: "应检次数",
    type: "bar",
    barWidth: 15,
    itemStyle: {
      normal: {
        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
          offset: 0,
          color: "rgba(61,126,235, 1)"
        },
        {
          offset: 1,
          color: "rgba(61,126,235, 0)"
        }
        ]),
        borderColor: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
          offset: 0,
          color: "rgba(160,196,225, 1)"
        },
        {
          offset: 1,
          color: "rgba(61,126,235, 1)"
        }
        ]),
        borderWidth: 2
      }
    },
    data: [15, 18, 25, 10, 15, 16, 9, 12, 11, 18, 8, 14, 16, 19, 22, 14]
  },

  {
    name: "实检次数",
    type: "bar",
    barWidth: 15,
    itemStyle: {
      normal: {
        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(15,197,243,1)' }, { offset: 1, color: 'rgba(15,197,243,0)' }]),
        borderColor: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(180,240,255,1)' }, { offset: 1, color: 'rgba(15,197,243,1)' }]),
        borderWidth: 2
      }
    },
    data: [12, 15, 22, 9, 12, 14, 7, 11, 11, 17, 8, 10, 16, 13, 21, 9]
  }


  ]
};


export default option